#include"stack_queue.h"


void Test1()//测试stack
{
	my_stack_queue::stack<int> st1;
	for (int i = 0; i < 10; ++i)
		st1.push(i);

	my_stack_queue::stack<int> st2;

	st2.swap(st1);

	cout << st2.size() << endl;
	while (!st2.empty())
	{
		printf("%d ", st2.top());
		st2.pop();
	}

	cout << endl;
	cout << st2.size() << endl;
}

void Test2()//测试queue
{
	my_stack_queue::queue<int> q1;
	for (int i = 0; i < 10; ++i)
		q1.push(i);

	my_stack_queue::queue<int> q2;

	q2.swap(q1);
	cout << q2.size() << endl;
	while (!q2.empty())
	{
		printf("%d ", q2.front());
		q2.pop();
	}
	cout << endl;
	cout << q2.size() << endl;
}
int main()
{
	Test1();
	Test2();
	return 0;
}